-- GENERATED SPELL FOR [Slag] --


function spell0_28585(pUnit, Event) --@Blast Wave,Self--
pUnit:FullCastSpellOnTarget(22424,pUnit)
pUnit:RegisterEvent('Sorts_28585', 6294, 1)
end

function spell1_28585(pUnit, Event) --@Blast Wave,Self--
pUnit:FullCastSpellOnTarget(23113,pUnit)
pUnit:RegisterEvent('Sorts_28585', 6324, 1)
end

function spell2_28585(pUnit, Event) --@Melt Armor,Self--
pUnit:FullCastSpellOnTarget(61509,pUnit)
pUnit:RegisterEvent('Sorts_28585', 25302, 1)
end

function spell3_28585(pUnit, Event) --@Melt Armor,Self--
pUnit:FullCastSpellOnTarget(61510,pUnit)
pUnit:RegisterEvent('Sorts_28585', 25348, 1)
end

function Sorts_28585(pUnit, Event)
local choix_sorts_28585 = math.random(0, 3)
if choix_sorts_28585 == 0 then
pUnit:RegisterEvent('spell0_28585', 1, 1)
end
if choix_sorts_28585 == 1 then
pUnit:RegisterEvent('spell1_28585', 1, 1)
end
if choix_sorts_28585 == 2 then
pUnit:RegisterEvent('spell2_28585', 1, 1)
end
if choix_sorts_28585 == 3 then
pUnit:RegisterEvent('spell3_28585', 1, 1)
end
end

function mob28585_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28585', math.random(1500, 3000), 1)
end

function mob28585_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28585_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28585_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28585, 1, 'mob28585_Action')
RegisterUnitEvent(28585, 2, 'mob28585_Leave')
RegisterUnitEvent(28585, 3, 'mob28585_Kill')
RegisterUnitEvent(28585, 4, 'mob28585_Die')
